/**
 * 历史记录 API - RuoYi 风格
 * 入参出参全用 any，字段直接拼字符串
 */

import { get, post } from '../request'

/**
 * 获取历史记录列表-chat（分页）
 */
export const getHistoryChatList = async (params?: any): Promise<any> => {
  return get('/backend-api/sessions', params)
}

/**
 * 根据 ID 获取历史记录详情-chat
 */
export const getHistoryChatById = async (id: string): Promise<any> => {
  return get(`/backend-api/sessions/${id}`)
}

/**
 * 创建新历史记录
 */
export const createHistoryChat = async (): Promise<any> => {
  return post('/backend-api/sessions')
}

/**
 * 获取历史记录列表-card（分页）
 */
export const getHistoryCardList = async (params?: any): Promise<any> => {
  return get('/backend-api/sessions', params)
}

/**
 * 根据 ID 获取历史记录详情-card
 */
export const getHistoryCardById = async (id: string): Promise<any> => {
  return get(`/backend-api/sessions/${id}`)
}
